package javajc;

import java.util.Scanner;

public class day04_GuessingDowhile {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int sum = (int)(Math.random()*1000+1);
        int a;
        do{
            System.out.println("猜吧");
            a = scan.nextInt();
            if(a>sum){
                System.out.println("猜大了");
            }else{
                System.out.println("猜小了");
            }
        }while(a!=sum);
        System.out.println("恭喜你猜对了");
    }
}
